/* 图表容器基础样式 */
.chart-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    background-color: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 图表加载状态 */
.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

.chart-loading::after {
    content: '';
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 图表工具提示 */
.chart-tooltip {
    background-color: rgba(0, 0, 0, 0.75);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: #ffffff;
    font-size: 0.875rem;
    line-height: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 图表标题 */
.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* 图表图例 */
.chart-legend {
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

/* 图表网格线 */
.chart-grid {
    stroke: #e5e7eb;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

/* 图表轴线 */
.chart-axis {
    stroke: #9ca3af;
    stroke-width: 1;
}

.chart-axis-label {
    fill: #6b7280;
    font-size: 0.75rem;
}

/* 图表数据点 */
.chart-point {
    fill: #ffffff;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.chart-point:hover {
    transform: scale(1.5);
}

/* 图表区域 */
.chart-area {
    opacity: 0.1;
    transition: opacity 0.2s ease;
}

.chart-area:hover {
    opacity: 0.2;
}

/* 图表柱状图 */
.chart-bar {
    transition: all 0.2s ease;
}

.chart-bar:hover {
    opacity: 0.8;
}

/* 图表饼图 */
.chart-pie {
    transition: all 0.2s ease;
}

.chart-pie:hover {
    transform: scale(1.02);
}

/* 图表仪表盘 */
.chart-gauge {
    transition: all 0.2s ease;
}

.chart-gauge-value {
    font-size: 1.5rem;
    font-weight: 600;
    fill: #1f2937;
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .chart-container {
        background-color: #1f2937;
    }

    .chart-loading {
        background-color: rgba(31, 41, 55, 0.9);
    }

    .chart-loading::after {
        border-color: #4b5563;
        border-top-color: #60a5fa;
    }

    .chart-tooltip {
        background-color: rgba(0, 0, 0, 0.9);
    }

    .chart-title {
        color: #f3f4f6;
        border-bottom-color: #4b5563;
    }

    .legend-item {
        color: #9ca3af;
    }

    .chart-grid {
        stroke: #374151;
    }

    .chart-axis {
        stroke: #6b7280;
    }

    .chart-axis-label {
        fill: #9ca3af;
    }

    .chart-point {
        fill: #1f2937;
    }

    .chart-gauge-value {
        fill: #f3f4f6;
    }
}

.system-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-card {
    background-color: #2a2f35;
    border-radius: 8px;
    padding: 16px;
    flex: 1;
    min-width: 200px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.stat-label {
    color: #8b8e92;
    font-size: 14px;
}

.usage-bar {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 2px;
    transition: width 0.3s ease;
} 